#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ix-nsswitch
# BEFORE: nsswitch
# REQUIRE: rtsold

. /etc/rc.freenas


generate_nsswitch_start()
{
	LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/midclt call etc.generate nss > /dev/null
}

generate_nsswitch_stop()
{
	LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/midclt call etc.generate nss > /dev/null
}

name="ix-nsswitch"
start_cmd='generate_nsswitch_start'
stop_cmd='generate_nsswitch_stop'

load_rc_config $name
run_rc_command "$1"
